﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BusinessComponents.ReservationMaster>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	My Reservation History
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <h2></h2>

   <fieldset>
    <legend>My Reservation History</legend>

    <table>
        <tr>
            <th></th>
            <th>
                Reservation ID
            </th>

            <th>
                Start Date
            </th>
            <th>
                End Date
            </th>
            <th>
                No. of Day
            </th>
            <th>
                No. of Room
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Details", "Details", new { id=item.ReservationId })%>
            </td>
            <td>
                <%: item.ReservationId %>
            </td>
            <td>
                <%: item.StartDate.ToString("dd MMM yyyy") %>
            </td>
            <td>
                <%: item.EndDate.ToString("dd MMM yyyy") %>
            </td>
            <td>
                <%: item.DayCount %>
            </td>
            <td>
                <%: item.RoomCount %>
            </td>
        </tr>
    
    <% } %>

    </table>
   </fieldset>

    <p>
        <%: Html.ActionLink("Make Reservation", "Create") %>
    </p>

</asp:Content>

